package main

import (
	"fmt"
	"math"
	"net"
	"strconv"
)

func main() {
	var name string = "codeniu"
	var age int = 18
	var isMarried bool

	var str = fmt.Sprintf("My name is %s,"+"我 %d 岁了", name, age)
	fmt.Println(str)
	fmt.Println(isMarried)

	conn, err := net.Dial("tcp", "127.0.0.1:8080")
	fmt.Println(conn, err)

	conn2, err := net.Dial("tcp", "127.0.0.1:9798")
	fmt.Println(conn2, err)

	// 浮点数的范围
	fmt.Println(math.MaxFloat32, math.MaxFloat64)

	// 类型转换
	i, _ := strconv.Atoi("-42")
	s := strconv.Itoa(-42)
	fmt.Println(i, s)

}
